﻿<Controls:MetroWindow x:Class="HmmmIDE.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" 
        xmlns:w="clr-namespace:HmmmIDE"
        Title="HMMMM IDE" Height="500" Width="800" TitleCaps="False" Closing="MetroWindow_Closing">
    <Controls:MetroWindow.CommandBindings>
        <CommandBinding Command="New" CanExecute="CanExecute" Executed="NewCommand_Executed" />
        <CommandBinding Command="Open" CanExecute="CanExecute" Executed="OpenCommand_Executed" />
        <CommandBinding Command="Save" CanExecute="CanExecute" Executed="SaveCommand_Executed" />
        <CommandBinding Command="SaveAs" CanExecute="CanExecute" Executed="SaveAsCommand_Executed" />
        <CommandBinding Command="w:MainWindow.RunPython" CanExecute ="CanExecute" Executed="RunCodeViaPython" />
        <CommandBinding Command="w:MainWindow.RunIDE" CanExecute ="CanExecute" Executed="RunCodeViaIDE" />
        <CommandBinding Command="w:MainWindow.About" CanExecute ="CanExecute" Executed="AboutDialog" />
        <CommandBinding Command="Close" CanExecute="CanExecute" Executed="CommandClose"/>
    </Controls:MetroWindow.CommandBindings>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="95*"/>
            <ColumnDefinition Width="37*"/>
        </Grid.ColumnDefinitions>
        <DockPanel Grid.ColumnSpan="2">
            <Menu DockPanel.Dock="Top"
              SnapsToDevicePixels="True"
              Margin="2,0,0,0"
              Name="MainMenu">
                <MenuItem Header="_File">
                    <MenuItem Header="_Open" Command="ApplicationCommands.Open">
                    </MenuItem>
                    <MenuItem Header="_New" Command="ApplicationCommands.New">
                    </MenuItem>
                    <MenuItem Header="_Save" Command="ApplicationCommands.Save">
                    </MenuItem>
                    <MenuItem Header="_Save As" Command="ApplicationCommands.SaveAs">
                    </MenuItem>
                    <MenuItem Header="_Recent Files" Name="RecentFles">
                    </MenuItem>
                    <MenuItem Header="_Close" Command="ApplicationCommands.Close">
                    </MenuItem>
                </MenuItem>
                <MenuItem Header="_Run">
                    <MenuItem Header="_Run via Python..." Command="w:MainWindow.RunPython"></MenuItem>
                    <MenuItem Header="_Run via IDE Simulator..." Command="w:MainWindow.RunIDE"></MenuItem>
                </MenuItem>
                <MenuItem Header="_About" Command="w:MainWindow.About">
                </MenuItem>
            </Menu>
            <avalonEdit:TextEditor
            xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
            x:Name="hmmmEditor"
            FontFamily="Consolas"
            FontSize="10pt" Background="#FF333337" ShowLineNumbers="True">

            </avalonEdit:TextEditor>
        </DockPanel>
    </Grid>

</Controls:MetroWindow>
